#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>

using namespace std;

int main(void){
    vector<int> vint;
    // vint.resize(10);
    // vint.resize(10, 1);
    printf("Initial Vector\t");
    printf("Size: %lu; \n", vint.size());

    int i;
    // push 10 values and access 
    printf("Add 10 Elements\t");
    for(i=0; i<10; ++i){
        vint.push_back(i);
    }
    printf("Size1: %lu; \n", vint.size());
    printf("Access: \n");
    for(i=0; i<10; ++i){
        printf("[%dth] value is: [%d]; \n", i, vint[i]);
    }

    // iterator pointer
    vector<int>::iterator beg = vint.begin();
    vector<int>::iterator end = vint.end();
    while(beg!=end){
        printf("%d ", *beg);
        ++beg;
    }
    printf("\n");

    vint.clear();
    return 0;
}
